#pragma once

#ifndef PLAYER_H_
#define PLAYER_H_

#include <list>
#include "PhysicalObject.h"
#include "Box2D/Box2D.h"

using namespace std;
using namespace sf;

class Player : public PhysicalObject
{
public:
	Player(GameState *gameState);
	~Player();

	virtual void draw();

	virtual void update(double dt);

	virtual void beginContact(b2Contact *contact);

	virtual void endContact(b2Contact *contact);

	virtual void PreSolve(b2Contact* contact, const b2Manifold* oldManifold);

	void setState(int state) { m_state = state; }

	int getState() { return m_state; }

	void setParams(float angle, float force) { m_angle = angle; m_force = force; }

  b2Vec2 getJumpPosition() { return m_jumpPos; }

private:
	int m_state;

	float m_angle;

	float m_force;

	Texture *m_sprite[8];

	int m_frame;

	bool m_runAnim;

  b2Vec2 m_jumpPos;

};

#endif
